<template>
  <div class="score-card">
    <div class="card-header">
      <h2>芝麻分数</h2>
      <button @click="toggleDateOptions">日期</button>
    </div>
    <div class="card-content">
      <p v-if="showToday">今天: 700+</p>
      <p v-if="showYesterday">昨天: 600-650</p>
      <p v-if="showDayBeforeYesterday">前天: 600以下</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      showToday: false,
      showYesterday: false,
      showDayBeforeYesterday: false,
    };
  },
  methods: {
    toggleDateOptions() {
      this.showToday = !this.showToday;
      this.showYesterday = !this.showYesterday;
      this.showDayBeforeYesterday = !this.showDayBeforeYesterday;
    },
  },
};
</script>

<style scoped>
.score-card {
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-content {
  font-size: 16px;
}

button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  color: blue;
  padding: 0;
}
</style>
